
package com.jf.cloud.order.feign;

import com.jf.cloud.api.order.bo.EsOrderInvoiceBO;
import com.jf.cloud.api.order.feign.OrderInvoiceFeignClient;
import com.jf.cloud.common.response.ServerResponseEntity;
import com.jf.cloud.order.mapper.OrderInvoiceMapper;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RestController;
import io.swagger.v3.oas.annotations.Hidden;

/**
 * @author zz
 * @date 2020/12/25
 */
@RestController
@Hidden
public class OrderInvoiceFeignController implements OrderInvoiceFeignClient {

    private final Logger logger = LoggerFactory.getLogger(OrderInvoiceFeignController.class);

    @Autowired
    private OrderInvoiceMapper orderInvoiceMapper;

    @Override
    public ServerResponseEntity<EsOrderInvoiceBO> getEsOrderInvoice(Long orderInvoiceId) {
        return ServerResponseEntity.success(orderInvoiceMapper.getEsOrderInvoice(orderInvoiceId));
    }

    @Override
    public ServerResponseEntity<EsOrderInvoiceBO> getEsOrderInvoiceByOrderId(Long orderId) {
        return ServerResponseEntity.success(orderInvoiceMapper.getEsOrderInvoiceByOrderId(orderId));
    }
}
